package com.xinchao.model.vo;

import com.xinchao.core.constant.LogType;
import com.xinchao.core.util.DateUtils;

/**
 * @ClassName DeviceLogListVO
 * @Description 终端日志VO
 * @Author HanQinrui
 * @Date 2018/8/9 11:10
 * @Version 1.0
 */
public class DeviceLogListVO {
	/** 上传时间 */
	private Long createTime;
	/** 日志名称 */
	private String logName;
	/** 日志类型 */
	private String logType;
	/** 日志存储路径（阿里云或华为云地址） */
	private String logURL;

	public Long getCreateTime() {
		return createTime;
	}
	
	public String getCreateTimeDesc() {
		if ( null == createTime ) {return null;}
		return DateUtils.longTimeStampToStringDate(createTime, DateUtils.PATTEN_YMD_HMS); 
	}
	
	public void setCreateTime(Long createTime) {
		this.createTime = createTime;
	}

	public String getLogName() {
		return logName;
	}

	public void setLogName(String logName) {
		this.logName = logName;
	}

	public String getLogType() {
		return logType;
	}
	
	public String getLogTypeDesc() {
		if ( null == logType ) {return null;}
		try {
			return LogType.valueOf(logType).getLogName(); 
		} catch (Exception e) {
			return "其他"; 
		}
	}
	
	public void setLogType(String logType) {
		this.logType = logType;
	}

	public String getLogURL() {
		return logURL;
	}

	public void setLogURL(String logURL) {
		this.logURL = logURL;
	}

}
